package com.yonyou.cms.epc.client.entity.graphic;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yonyou.cms.epc.client.entity.BasePO;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author yzy
 * @since 2022-06-08
 */
@TableName("tt_graphic_model")
public class GraphicModelPO extends BasePO<GraphicModelPO> {

    private static final long serialVersionUID = 1L;

    /**
     * 图解车型id
     */
    @TableId(value = "MODEL_ID", type = IdType.AUTO)
    private Integer modelId;
    /**
     * 车型代码
     */
    @TableField("MODEL_CODE")
    private String modelCode;
    /**
     * 车型名称
     */
    @TableField("MODEL_NAME")
    private String modelName;

    @TableField("APP_ID")
    private String appId;

    public GraphicModelPO() {
        super();
    }

    public Integer getModelId() {
        return modelId;
    }

    public void setModelId(Integer modelId) {
        this.modelId = modelId;
    }

    public String getModelCode() {
        return modelCode;
    }

    public void setModelCode(String modelCode) {
        this.modelCode = modelCode;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getModelName() {
        return modelName;
    }

    public void setModelName(String modelName) {
        this.modelName = modelName;
    }

    @Override
    protected Serializable pkVal() {
        return this.modelId;
    }

    @Override
    public String toString() {
        return "GraphicModelPO{" +
        "modelId=" + modelId +
        ", modelCode=" + modelCode +
        ", modelName=" + modelName +
        "}";
    }

    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author yzy
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "modelId");
    }

}
